package P1_2;

public class T03 {
    public static void main(String[] args) {
        person per=new student();
        student stu=new student();
        System.out.println(per.olderThan(stu));
        System.out.println(per.olderThan(per));
        System.out.println(stu.olderThan(per));
    }
}
class person{
    private int age;
    public int getAge() {
        return age;
    }
    public void setAge(int age) {
        this.age = age;
    }
    public boolean olderThan(person p){
        return age>p.getAge();
    }
}
class student extends person{

}